public class TuneAdMetadata extends Object
Constructor and Description |
---|
TuneAdMetadata()
Default TuneAdMetadata Object with gender : UNKNOWN, birthDate : null,
location: null, keywords : empty,
customTargets: empty, debugMode : false
|
Modifier and Type | Method and Description |
---|---|
boolean |
addKeyword(String keyword)
Add user's keyword for targeting purpose
|
Date |
getBirthDate()
Gets user's birthdate
|
Map<String,String> |
getCustomTargets()
Gets custom targeting key-values
|
MATGender |
getGender()
Gets the user's gender
|
Set<String> |
getKeywords()
Gets ad keywords
|
double |
getLatitude()
Gets user's latitude
|
Location |
getLocation()
Gets user's location
|
double |
getLongitude()
Gets user's longitude
|
boolean |
isInDebugMode()
Checks if the request is for debug
|
boolean |
removeKeyword(String keyword)
Remove a keyword
|
TuneAdMetadata |
withBirthDate(Date birthDate)
Sets user's birthdate for targeting purpose
|
TuneAdMetadata |
withBirthDate(int year,
int month,
int day)
Sets user's birthdate for targeting purpose
|
TuneAdMetadata |
withCustomTargets(Map<String,String> customTargets)
Sets custom key-value pairs to use for targeting
|
TuneAdMetadata |
withDebugMode(boolean debugMode)
Sets the request to be in debug mode
|
TuneAdMetadata |
withGender(MATGender gender)
Sets the user's gender for targeting purpose
|
TuneAdMetadata |
withKeywords(Set<String> keywords)
Sets user's keywords for targeting purpose
|
TuneAdMetadata |
withLocation(double latitude,
double longitude)
Set user's location latitude/longitude for targeting purpose
|
TuneAdMetadata |
withLocation(Location location)
Set user's location for targeting purpose
|
public TuneAdMetadata()
public boolean isInDebugMode()
public TuneAdMetadata withDebugMode(boolean debugMode)
debugMode
- debug enabledpublic Date getBirthDate()
public TuneAdMetadata withBirthDate(int year, int month, int day)
year
- month
- range from 1 to 12day
- public TuneAdMetadata withBirthDate(Date birthDate)
birthDate
- birthdatepublic Map<String,String> getCustomTargets()
public TuneAdMetadata withCustomTargets(Map<String,String> customTargets)
customTargets
- map of key-value pairs for additional targetingpublic MATGender getGender()
public TuneAdMetadata withGender(MATGender gender)
gender
- user's genderpublic TuneAdMetadata withKeywords(Set<String> keywords)
keywords
- public boolean addKeyword(String keyword)
keyword
- public boolean removeKeyword(String keyword)
keyword
- public Location getLocation()
public TuneAdMetadata withLocation(Location location)
location
- public double getLatitude()
public double getLongitude()
public TuneAdMetadata withLocation(double latitude, double longitude)
latitude
-